package com.rr.sc.bo;

import java.util.List;

import org.springframework.transaction.annotation.Transactional;

import com.rr.sc.model.Category;

@Transactional
public interface CategoryBo {

    @Transactional
    public void saveOrUpdate(Category category);

    @Transactional(readOnly = true)
    public Category get(Long id);

    @Transactional
    public void delete(Category category);

    @Transactional(readOnly = true)
    public List<Category> getByUserId(Long userId, boolean onlyRoots);

    @Transactional(readOnly = true)
    public List<Category> getByUserIdAndName(Long userId, String name);

    public void check(Category category);
}
